package cn.lili.modules.system.client;

import cn.lili.modules.constant.ServiceConstant;
import cn.lili.modules.system.entity.dos.Logistics;
import cn.lili.modules.system.entity.dos.SupplyChain;
import cn.lili.modules.system.entity.vo.Traces;
import cn.lili.modules.system.fallback.LogisticsFallback;
import cn.lili.modules.system.fallback.SupplyChainFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 供应链客户端
 *
 * @author Chopper
 * @version v1.0
 * 2021-11-08 09:52
 */
@FeignClient(path = "${server.servlet.context-path}", name = ServiceConstant.SYSTEM_SERVICE, contextId = "supplyChain", fallback = SupplyChainFallback.class)
public interface SupplyChainClient {


    /**
     * 获取供应商可以选择的供应链
     *
     * @return 全部物流
     */
    @GetMapping("/feign/supplychain/supplier")
    List<SupplyChain> listBySupplierId(@RequestParam String supplierId);

    /**
     * 根据id获取供应链信息
     *
     * @return
     */
    @GetMapping("/feign/supplychain/query")
    SupplyChain getById(@RequestParam String supplyChainId);


}
